/**
 * @description: 文件描述
 * @version: 0.0.1
 * @author: xxx
 * @Date: 2025-01-18 19:14:43
 */
let { trackMoreFun, globalData } = getApp();
Page({
  data: {
    showNum: 0,
    info: false
  },

  onLoad(query = {}) {
    console.log("xxxxxxxxxxxoptionsxxxxxxxxxxxxxxxxx", query)
    globalData.pageState = false

     my.setNavigationBar({ title: "发现你的嗅觉个性" });
    const { hideBack, channel } = query

    if (channel) {
     getApp().globalData.channel = channel
     getApp().globalData.channel2 = channel
    }
    if (hideBack) {
      my.hideBackHome({});
    }
    this.setData({
      showNum: 1
    })

    globalData.imgData = {
      column1: null,
      column2: null,
      column3: null,
      column4: null,
      column5: null,
      column6: null,
      column7: null,
      x: 0,
      y: 0,
      isChecLength: 0,
      isSet_x_y: true
    },
      globalData.textData = {
        selectedItems: null,
        checkTextList: null,
      },

      globalData.typeData = {
        num: 5,
      }
    globalData.pageNum = 1

  },
  onChangeNext() {
  },
  onChildEvent(event) {
    this.setData({
      showNum: event.num
    })
  },
  onItemClick() {
  },
  // 事件处理函数对象
  events: {
    onBack() {
      this.setData({
        showNum: 4
      })
    },
  },
  onShow() {
    // 从详情页过来 
    if (globalData.pageState) {
      this.setData({
        showNum: 4
      })
    } else {
      this.setData({
        showNum: globalData.pageNum
      })
    }

  },
  onHide() {
    // 从详情页过来 
    if (globalData.pageState) {
      this.setData({
        showNum: 4
      })
    } else {
      this.setData({
        showNum: 0
      })
    }
  },
  onShareAppMessage() {
    return {
      title: '香奈儿的个性象征', // 标题
      desc: '发现你的嗅觉个性', // 描述
      path: 'pages/webview/webview?code=personality_symbol', // 页面
      imageUrl: 'https://morefun-active.oss-cn-beijing.aliyuncs.com/chanel_c2b_web/xing/longpage/preview_img/share_img.png'
    }
  },
})
